package observer.zhss;

/**
 * @author zhangxi
 * @date 2021/10/28
 */
public class ObserverDemo {
    public static void main(String[] args) {
        Subject subject = new Subject();
        subject.setState(0);
        ConceratteObserver conceratteObserver = new ConceratteObserver();
        subject.addObserver(conceratteObserver);
        subject.setState(1);
        subject.setState(2);

    }
}
